﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DreamBox.Admin.Posts
{
    public partial class ClassAdd : BLL.BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_Post_Click(object sender, EventArgs e)
        {
            Model.PostsClass m = new Model.PostsClass();
            m.ClassName = tbox_ClassName.Text;
            m.Description = tbox_Description.Text;
          
            m.IsStatus = cbox_IsStatus.Checked;

            m.Sort = Htss.Platform.Core.Transform.GetInt(tbox_Sort.Text, 99);

            DAL.MAction action = new DAL.MAction();
            if (action.Insert(m))
            {
                BLL.Admin.Tips.DetailedTips(this, "操作成功", "/Posts/ClassList.aspx", "1");
            }
        }
    }
}